<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>骑手管理</title>
    <#include "/include/resource.html"/>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <#include "/include/header.html"/>
    <!-- Left side column. contains the logo and sidebar -->
    <#include "/include/main-sidebar.html"/>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                会员列表
                <small>会员信息列表</small>
            </h1>
            <ol class="breadcrumb">
                <li><i class="fa fa-dashboard"></i> 会员列表</li>
                <li class="active">会员信息列表</li>
            </ol>
        </section>

        <!-- Main content -->
        <form id="tableForm" method="post" class="form-horizontal" action="${base}/admin/rider/list">
            <section class="content">
                <div class="row">
                    <div class="col-md-12">
                        <div class="box">

                            <!-- /.box-header -->
                            <div class="box-body">
                                <div class="form-group">
                                    <div class="row">
                                        <div class="col-md-3">
                                            <label for="inputEmail3_" class="col-md-4 control-label">Name：</label>
                                            <div class="col-md-8">
                                                <input type="text" class="form-control" value="${(riderName)!''}"
                                                       name="riderName" id="inputEmail3_" placeholder="Name">
                                            </div>
                                        </div>
                                        <div class="col-md-3">
                                            <label for="inputEmail3_" class="col-md-4 control-label">电话号码：</label>
                                            <div class="col-md-8">
                                                <input type="text" class="form-control" value="${(riderName)!''}"
                                                       name="phone" id="inputEmail4_" placeholder="电话号码">
                                            </div>
                                        </div>
                                        <div class="col-xs-3">
                                            <button type="button" onclick="HF.query('tableForm');"
                                                    class="btn btn-primary">Query
                                            </button>
                                        </div>
                                    </div>
                                </div>
                                <table class="table table-bordered">
                                    <tr>
                                        <th>SequenceNo</th>
                                        <th>区域</th>
                                        <th>姓名</th>
                                        <th>联系方式</th>
                                        <th>身份证正面</th>
                                        <th>身份证反面</th>
                                        <th>Status</th>
                                        <th>ActionList</th>
                                    </tr>
                                    <#if list??&&list?size gt 0>
                                        <#list list as t>
                                            <tr>
                                                <td>${t_index+1}</td>
                                                <td>${(t.department.name)!"--"}</td>
                                                <td>${(t.name)!"--"}</td>
                                                <td>${(t.phone)!"--"}</td>
                                                <td>
                                                    <a href="${(t.cardFront)!}" target="_blank">
                                                        <img src="${(t.cardFront)!}" style="width: 100px;height: 50px">
                                                    </a>
                                                </td>
                                                <td>
                                                    <a href="${(t.cardReverse)!}" target="_blank">
                                                        <img src="${(t.cardReverse)!}" style="width: 100px;height: 50px">
                                                    </a>
                                                </td>
                                                <td>${(t.getStateStr())!"--"}</td>
                                                <td>
                                                    <!--
                                                    <button type="button" class="btn btn-block btn-default btn-sm"
                                                     data-toggle="modal" onclick="cancelOrder(${t.id})">取消订单</button>
                                                       -->
                                                    <div class="btn-group">
                                                        <button type="button" class="btn btn-default">..</button>
                                                        <button type="button" class="btn btn-default dropdown-toggle"
                                                                data-toggle="dropdown">
                                                            <span class="caret"></span>
                                                            <span class="sr-only">Toggle Dropdown</span>
                                                        </button>
                                                        <ul class="dropdown-menu" role="menu">
                                                            <li>
                                                                <a href="#" onclick="HF.showDialog('${base}/admin/rider/operate?id=${t.id}')">核准激活</a>
                                                                <a href="#" onclick="HF.showDialog('${base}/admin/admin_order/payLog/list?riderId=${t.id}')">充值记录</a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </td>
                                            </tr>
                                        </#list>
                                    </#if>
                                </table>
                            </div>
                            <!-- /.box-body -->
                            <@p.pager pageNo=pageNo pageSize=pageSize totalCount=totalCount />
                        </div>
                        <!-- /.box -->
                    </div>
                </div>
            </section>
        </form>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <#include "/include/modal.html"/>
    <#include "/include/footer.html"/>
    <div class="control-sidebar-bg"></div>
</div>
<#include "/include/js_footer.html"/>
</body>
</html>
<script>
    function setState(state,id) {
        $.ajax({
            type: "GET",
            url: "/admin/rider/setState?id="+id+"&state="+state,
            dataType: "json",
            success: function(data){
                alert("设置 Success");
                document.location.reload();
            },
            error:function(){
                alert("系统未知异常!");
            }
        });
    }
</script>
